enum T3FontWeight {
  regular,
  medium,
  semiBold,
  bold;
}

class T3TextStyle {
  final String color;
  final double fontSize;
  final T3FontWeight fontWeight;

  T3TextStyle({
    required this.color,
    required this.fontSize,
    required this.fontWeight,
  });

  Map<String, dynamic> toJson() {
    return {
      'color' : color,
      'fontSize' : fontSize,
      'fontWeight' : fontWeight.name
    };
  }
}

class T3TextOption {
  final String text;
  final T3TextStyle normalStyle;
  final T3TextStyle? highlightStyle;

  T3TextOption({
    required this.text,
    required this.normalStyle,
    this.highlightStyle
  });

  Map<String, dynamic> toJson() {
    var json = {
      'text' : text,
      'normalStyle' : normalStyle.toJson(),
    };
    var highlight = highlightStyle?.toJson();
    if (highlight != null) {
      json['highlightStyle'] = highlight;
    }
    return json;
  }
}